package com.zixi.ai.rag.entity;

import com.alibaba.fastjson2.JSONObject;
import com.zixi.ai.framework.entity.ExtBaseEntity;
import com.zixi.ai.framework.entity.convert.JSONObjectConverter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * @author wfg
 */
@Getter
@Setter
@Entity
@Table(name = "zx_ai_knowledge")
@Tag(name = "AiKnowledgeEntity", description = "知识库")
public class AiKnowledgeEntity extends ExtBaseEntity {
    /**
     * ICON
     */
    private String icon;

    /**
     * 标题
     */
    private String title;

    /**
     * 英文名称
     */
    private String englishName;

    /**
     * 描述
     */
    private String description;

    /**
     * URL 别名
     */
    private String slug;

    /**
     * 是否启用向量存储
     */
    private Boolean vectorStoreEnable;

    /**
     * 向量数据库类型
     */
    private String vectorStoreType;

    /**
     * 向量数据库集合
     */
    private String vectorStoreCollection;

    /**
     * 向量数据库配置
     */
    private String vectorStoreConfig;

    /**
     * 是否启用搜索引擎
     */
    private Boolean searchEngineEnable;

    /**
     * Embedding 模型ID
     */
    private Long vectorEmbedLlmId;

    /**
     * 重排 模型ID
     */
    private Long rerankLlmId;
    /**
     * 其他配置
     */
    @Convert(converter = JSONObjectConverter.class)
    private JSONObject options;
}
